﻿using Nop.Core.Domain.Directory;
using System.Collections.Generic;

namespace Nop.Core.Domain.Logistics
{
    /// <summary>
    /// Represents a district. Typically it is an area combined with zones.
    /// </summary>
    public class District : BaseEntity
    {
        private ICollection<Zone> _zones;

        /// <summary>
        /// Gets or sets the region identifier
        /// </summary>
        public virtual int RegionId { get; set; }

        /// <summary>
        /// Gets or sets the state/province identifier
        /// </summary>
        public virtual int StateProvinceId { get; set; }

        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public virtual string Name { get; set; }

        /// <summary>
        /// Gets or sets the district code, e.g. VAN, CAL, EDM
        /// </summary>
        public virtual string Code { get; set; }

        /// <summary>
        /// The display order of the zones
        /// </summary>
        public virtual int DisplayOrder { get; set; }

        /// <summary>
        /// Gets or sets the state/province
        /// </summary>
        public virtual StateProvince StateProvince { get; set; }

        /// <summary>
        /// Gets or sets the region.
        /// </summary>
        public virtual Region Region { get; set; }

        /// <summary>
        /// The contry code name 
        /// </summary>
        public virtual string CountryCode { get; set; }

        /// <summary>
        /// Gets or sets the time zone identifier
        /// </summary>
        public virtual string TimeZoneId { get; set; }

        /// <summary>
        /// Gets or sets zones.
        /// </summary>
        public virtual ICollection<Zone> Zones
        {
            get { return _zones ?? (_zones = new List<Zone>()); }
            protected set { _zones = value; }
        }
    }
}
